
// 菜单数据 包含 菜单，路由，按钮权限 的数据
/* 公共数据
  type:'menu'
  enabled:true, 是否使用该数据及其子节点数据，
*/
/* 菜单数据
  type:'menu'
  name:'菜单英文名' 如果需要支持国际化，则会通过 name 来获取对应的归属地名称
  icon:'',菜单图标
  label :'' 菜单 label 名称
  path:'', 跳转路径, 如果是完整 URL 则相当于外链，
  target:'', 配合 URL 控制是否在新窗口中打开页面
  ###
  {id:'@id',type:'menu',icon:'',label:'',path:'',target:'',name:'',children:[]}
*/


/* 路由数据
  type:'route'
  path:'' ,路由 路径，
  meta:{} ,路由 元数据 可以配合路由模板完成各种功能，常见的又 keepAlive:true  或者 内嵌的网页
  component:'', 路由 页面地址 默认从 /src 目录起 
  redirect:'', 重定向
  alias：'' , 别名
  name：'路由名'
  ####
  {id:'@id',type:'route',name:'',path:'',redirect:'',component:'',meta:{},children:[]}
*/

/* 按钮数据
  type:'button'
  name:'', 按钮代号名称 常见 如 add,view,del,edit 等 。。。 用于权限匹配
  {id:'@id',type:'button',name:''}
*/
const test = [
  {id:'@id',type:'route',path:'/test',name:'test',component:'components/container/base.container',redirect:'/test/home',children:[
    {id:'@id',type:'menu',icon:'home',label:'首页',path:'home',name:'Home',component:'views/home/index'},
    {id:'@id',type:'menu',icon:'test',label:'第一级',path:'level1',name:'Level1',children:[
      {id:'@id',type:'menu',icon:'test',label:'第二级',path:'level2',name:'Level2',children:[
        {id:'@id',type:'menu',icon:'test',label:'第三级',path:'level3',name:'Level3',children:[
          {id:'@id',type:'menu',icon:'test',label:'第四级',path:'level4',name:'Level4',component:'views/home/index',children:[
            {id:'@id',type:'button',name:'view'},
            {id:'@id',type:'button',name:'edit'},
            {id:'@id',type:'button',name:'add'},
          ]}
        ]}
      ]}
    ]}
  ]}
]
console.log(JSON.stringify(test))
export default [
  {
    url: RegExp('.*/api/get-menu.*'),
    method: 'get',
    // mock:[
    //   {
    //     id:'@id',type:'route',path:'/huarun',name:'huarun',component:'components/container/base.container',redirect:'/huarun/home/company',children:[
    //       {id:'@id',type:'menu',icon:'apple',label:'走进 CRSEMS',path:'home',name:'Home',children:[
    //         {id:'@id',type:'menu',icon:'apple',label:'公司介绍',path:'company',name:'home.company',component:'views/home/company'},
    //         {id:'@id',type:'menu',icon:'apple',label:'新闻中心',path:'news',name:'home.news',component:'views/home/news'},
    //         {id:'@id',type:'menu',icon:'apple',label:'关于我们',path:'withMe',name:'home.withMe',component:'views/home/withMe'},
    //       ]},
    //       {id:'@id',type:'menu',icon:'apple',label:'产品和服务',path:'productAndService',name:'productAndService',component:'views/products/index'},
    //       // {id:'@id',type:'menu',icon:'apple',label:'多级菜单测试',path:'test',name:'test',children:[
    //       //   {id:'@id',type:'menu',icon:'apple',label:'走进 CRSEMS',path:'home',component:'views/home/index'},
    //       //   {id:'@id',type:'menu',icon:'apple',label:'产品和服务',path:'productAndService',component:'views/products/index'},
    //       //   {id:'@id',type:'menu',icon:'apple',label:'测试嵌套',path:'test2',name:'test.test2',children:[
    //       //     {id:'@id',type:'menu',icon:'apple',label:'走进 CRSEMS',path:'home',name:'Home',component:'views/home/index'},
    //       //     {id:'@id',type:'menu',icon:'apple',label:'产品和服务',path:'productAndService',name:'test.test2.productAndService',component:'views/products/index',children:[
    //       //       {id:'@id',type:'button',name:'testA'},
    //       //       {id:'@id',type:'button',name:'testB'},
    //       //       {id:'@id',type:'button',name:'testC'},
    //       //     ]},
    //       //   ]},
    //       // ]},
    //       {id:'@id',type:'menu',icon:'apple',label:'解决方案',path:'scheme',name:'scheme',component:'views/products/index'},
    //       {id:'@id',type:'menu',icon:'apple',label:'服务市场',path:'service',name:'service',component:'views/products/index'},
    //       {id:'@id',type:'menu',icon:'apple',label:'开发这社区',path:'developers',name:'developers',component:'views/products/index'},
    //       {id:'@id',type:'menu',icon:'apple',label:'生态合作',path:'collaborate',name:'collaborate',component:'views/products/index'},
    //       {id:'@id',type:'menu',icon:'apple',label:'控制台',path:'control',name:'control',component:'views/products/index'},
    //     ]
    //   }
    // ]
    mock:test
  }
]

